<?php

namespace app\beautiful\middleware;

class Base{

    /**

     * 处理请求

     *  验证是否登录是否正确的中间件

     * @param \think\Request $request

     * @param \Closure       $next

     * @return Response

     */

    public function handle($request, \Closure $next)

    {

        $request->type="beautiful";

        $limit=$request->param('limit/d',10);

        $page=$request->param('page/d',1);

        $request->limit=$limit;

        $request->page=$page;

        return $next($request);

    }

}